package org.come.init;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class Main {
    public static GetUpdatesFram checkUpdate;

    public static void main(String[] args) throws FileNotFoundException {

        PrintStream err = new PrintStream(new FileOutputStream("resource//other//error.txt"));
        System.setErr(err);
        PrintStream out = new PrintStream(new FileOutputStream("resource//other//out.txt"));


        boolean sign = false;
        for (String arg : args) {
            if (arg.equals("-index")) sign = true;
        }
        if (sign) {
            try {
                org.come.test.Main.main(args);
            } catch (Exception e) {
                e.printStackTrace();
            }
            return;
        }
        checkUpdate = new GetUpdatesFram();
        Thread thread = new Thread(checkUpdate);
        thread.start();
    }
}
